Update theme-compat header and footer#36
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" /> | ||
| <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> | ||
|
|
||
| <?php if ( file_exists( get_stylesheet_directory() . '/images/kubrickbgwide.jpg' ) ) { ?> |
There was a problem hiding this comment.
removes (check for) Kubrick background image
| <meta charset="<?php bloginfo( 'charset' ); ?>" /> | ||
| <title><?php echo wp_get_document_title(); ?></title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="profile" href="https://gmpg.org/xfn/11" /> |
There was a problem hiding this comment.
- updates
charsetmeta, from TT1 - retains the hardcoded
titletag, as thetheme-compatwas intended for older themes - adds
viewportmeta (from TT1) - moves XFN profile link down
| <title><?php echo wp_get_document_title(); ?></title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="profile" href="https://gmpg.org/xfn/11" /> | ||
| <link rel="stylesheet" href="<?php echo esc_url( get_stylesheet_uri() ); ?>" type="text/css" media="all" /> |
There was a problem hiding this comment.
stylesheet link uses get_stylesheet_uri function, as Twenty Ten and Twenty Eleven do, and this changes media to all
|
|
||
| <?php wp_head(); ?> | ||
| if ( is_singular() && pings_open() ) { | ||
| echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '" />', "\n"; |
There was a problem hiding this comment.
checks whether pings are open for post before printing (from TT1, but adding self-closing slash and line break)
| echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '" />', "\n"; | ||
| } | ||
| if ( is_singular() ) { | ||
| wp_enqueue_script( 'comment-reply' ); |
There was a problem hiding this comment.
retains the comment-reply script, but this checks whether comments are open and threaded before printing the script (as themes since Twenty Twelve have done)
| <div id="headerimg"> | ||
| <h1><a href="<?php echo home_url(); ?>/"><?php bloginfo( 'name' ); ?></a></h1> | ||
| <div class="description"><?php bloginfo( 'description' ); ?></div> | ||
| <?php if ( ! empty( get_bloginfo( 'name' ) ) ) : ?> |
There was a problem hiding this comment.
checks whether the site has a site title before printing the header (avoiding an empty link and heading)
| <?php if ( ! empty( get_bloginfo( 'name' ) ) ) : ?> | ||
| <div id="header" role="banner"> | ||
| <div id="headerimg"> | ||
| <h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> |
There was a problem hiding this comment.
escapes home_url and adds rel="home" to the link, similar to themes such as Twenty Seventeen
| </div> | ||
| </div> | ||
| <hr /> | ||
| <hr aria-hidden="true" /> |
There was a problem hiding this comment.
retains horizontal rule for visual separation, but hides it from screen readers because it has no semantic value
| <hr /> | ||
| <div id="footer" role="contentinfo"> | ||
| <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> | ||
| <p> | ||
| <?php | ||
| printf( | ||
| /* translators: 1: Site name, 2: WordPress */ | ||
| __( '%1$s is proudly powered by %2$s' ), | ||
| get_bloginfo( 'name' ), | ||
| '<a href="https://wordpress.org/">WordPress</a>' | ||
| ); | ||
| ?> | ||
| </p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/ --> | ||
| <?php /* "Just what do you think you're doing Dave?" */ ?> | ||
|
|
There was a problem hiding this comment.
removes horizontal rule, footer, and the design credit (which does not fit the active theme)
There was a problem hiding this comment.
Trac 50171 did not remove the design credit, but the changes proposed in this PR would remove some vestiges of the Kubrick design.
| </head> | ||
|
|
||
| <body <?php body_class(); ?>> | ||
| <?php wp_body_open(); ?> |
There was a problem hiding this comment.
adds wp_body_open hook
| <title><?php echo wp_get_document_title(); ?></title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="profile" href="https://gmpg.org/xfn/11" /> | ||
| <style> :where(#header) { padding-left: 5%; padding-right: 5%; } </style> |
There was a problem hiding this comment.
The style tag adds padding specifically for the header with block themes, so it should line up with the multisite wp-activate and wp-signup forms instead of touching the edge. I used :where() so a stylesheet could override that easily.
There was a problem hiding this comment.
It could be a small amount of space instead, such as 1em.
Make the HTML a little better in the fallback templates.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.